EXERCISE 6: Let's continue with our refactor!

  • Delete the indented lines that start with size and color.
  • Replace all occurrences of num1 with random_amount. (The variables in our function should sound general.)
  • Go to and drag in Return Statement below the loop, but indented within the function.
  • Change my_var to random_amount.

To navigate the page using the TAB key, first press ESC to exit the code editor.

# THIS ACTIVITY IS IN PREVIEW ONLY MODE
  • Run Code
  • Submit Work
  • Next Activity
  • Show Console
  • Reset Code Editor
  • Codesters How To (opens in a new tab)